package com.yixing.tech.wms.controller;

import com.yixing.tech.common.base.BaseControl;
import com.yixing.tech.common.base.BusinessException;
import com.yixing.tech.common.base.Rs;
import com.yixing.tech.wms.param.PickDashboardParam;
import com.yixing.tech.wms.service.StockLocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 库区
 *
 * @author yixing tech
 * @since 1.0.0
 */
@RestController
@CrossOrigin
@RequestMapping(value = "/area")
public class AreaController extends BaseControl {

    @Autowired
    private StockLocationService stockLocationService;

    /**
     * 拣货区大屏
     */
    @PostMapping("/pick/dashboard")
    public Rs<Object> updateInStock(@RequestBody PickDashboardParam param) throws BusinessException {
        return Rs.ok(stockLocationService.pickDasbhoard(param.getAreaCode()));
    }

}
